package com.smart.manager.pop.entities.models;

import com.smart.common.entities.core.BaseLongModel;
import com.smart.manager.pop.entities.enums.BillKind;
import com.smart.manager.pop.entities.enums.BillState;
import com.smart.manager.pop.entities.views.InviterView;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import java.math.BigDecimal;


/**
 * 佣金台账
 *
 * @author Administrator
 */
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@Accessors(chain = true)

public class PopDisBill extends BaseLongModel {

    @ApiModelProperty("流水号")
    private String code;

    @ApiModelProperty(value = "受益分销员")
    @ManyToOne
    @JoinColumn(name = "agent",referencedColumnName = "id")
    private InviterView agent;

    @ApiModelProperty(value = "台账类型")
    private BillKind kind;

    @ApiModelProperty(value = "台账状态")
    private BillState status;

    @ApiModelProperty("流水金额")
    private BigDecimal amount; // 金额

    @ApiModelProperty(value = "台账备注")
    private String remark;


}
